#ifndef MOCKTHREADSTORAGE_H
#define MOCKTHREADSTORAGE_H

#include <gmock/gmock.h>

#include "threadstorage.h"

namespace MockObjects
{
	class MockThreadStorage : public Wishmaster::ThreadStorage
	{
		Q_OBJECT
	public:
		Q_INVOKABLE MockThreadStorage() {}
		virtual ~MockThreadStorage() {}

		MOCK_METHOD3(storeThread, bool(const QString& host, const QString& board, Wishmaster::Thread* thread));
		MOCK_METHOD3(restoreThread, Wishmaster::ThreadPtr(Wishmaster::Board* board, unsigned long thread_id, bool restorePosts));
		MOCK_METHOD3(restoreThread, bool(Wishmaster::Board* board, unsigned long thread_id, Wishmaster::Thread* thread));

		MOCK_METHOD1(deleteThread, void(unsigned long id));
		MOCK_METHOD1(setMaxThreads, void(int max));

		MOCK_METHOD3(thread, unsigned long(const QString& host, const QString& board, unsigned long thread_id));

		MOCK_METHOD1(setThread, unsigned long(const Wishmaster::ThreadEntry& entry));
		MOCK_METHOD1(getThread, Wishmaster::ThreadEntry(unsigned long thread_entry_id));
		MOCK_METHOD3(threadStorageDir, QString(const QString& host, const QString& board, unsigned long thread_id));
		MOCK_METHOD1(threadStorageDir, QString(const Wishmaster::PostId& postId));

		MOCK_METHOD2(threadList, QList<unsigned long>(const QString& host, const QString& board));
		MOCK_METHOD3(threadList, QList<unsigned long>(const QString& host, const QString& board, uint32_t flags));

		MOCK_METHOD2(deleteOldThreads, QList<unsigned long>(const QString& host, const QString& board));

	};
}

#endif // MOCKTHREADSTORAGE_H
